#pragma once
#include "RBTree.h"
namespace jib
{
	template<class K>
	class set
	{
		struct KeyOfSet
		{
			const K& operator()(const K& key)
			{
				return key;
			}
		};
	public:
		typedef typename RBTree<K, K, KeyOfSet>::iterator iterator;
        
		iterator begin()
		{
			return _t.begin();
		}
		iterator end()
		{
			return _t.end();
		}
		bool insert(const K& key)
		{
			return _t.insert(key);
		}
		iterator Find(const K& key)
		{
			return _t.Find(key);
		}
	private:
		RBTree<K, K, KeyOfSet> _t;
	};
}